<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<script>
$(function(){
	 $('#user_index_logForm input').bind("keyup",function(event){
	     if(event.keyCode==13){
	           $('#user_index_logForm').submit();//提交
	        }
	   }); 
      $('#user_index_logForm').form({
	       url:'${pageContext.request.contextPath}/userAction!login.action',
		   success:function(data){
			    var json=jQuery.parseJSON(data);
 		        if(json.success){
			        $('#user_index_logDialog').dialog('close');//关闭
			      }
			    $.messager.show({
			         title:'提示',
			         msg:json.msg
			    });
		 }
      });
 });
</script>
<div id="user_index_logDialog" class="easyui-dialog" data-options="
   title:'登录',
   closable:false,
   modal:true,
    buttons:[{
			   text:'注册',
			  iconCls:'icon-edit',
			  handler:function(){
			    $('#user_index_regDialog form input').val('');
			     $('#user_index_regDialog').dialog('open');
			 } 
			},{
			  text:'登录',
			 iconCls:'icon-help',
			 handler:function(){
			    $('#user_index_logForm').submit();
			 }
		}],
  ">
      <form id="user_index_logForm" method="post">
		   <table>
		      <tr>
		       <th>登录名</th>
		       <th><input name="name" class="easyui-validatebox" data-options="required:true,missingMessage:'用户名必填项'"/></th>
		     </tr>
		     <tr>
		       <th>密码</th>
		       <th><input name="pwd" type="password" class="easyui-validatebox" data-options="required:true, missingMessage:'密码必填'"/></th>
		    </tr>
		 </table>
    </form>
 </div>
   